using TheBlog.NhibernateModel.Entities;

namespace TheBlog.NhibernateModel.Mappings
{
    public class CommentMap : EntityMap<Comment>
    {
        public CommentMap()
        {
            References(x => x.Article, "ArticleId").ForeignKey("FK_Article_CommentAffect_ArticleId");
            Map(x => x.CommentDate).Not.Nullable();
            Map(x => x.FullName).Not.Nullable();
            Map(x => x.CommentText).Not.Nullable();
            Map(x => x.WebSite);
            Map(x => x.MailAdress);
        }
    }
}